package com.lx.nba.entiy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedNativeQuery;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="T_MAN")
@NamedQueries({
	
	@NamedQuery(name="AllMan", query="select m from Man m"),
	
	@NamedQuery(name="ManByPlayerId", query="select m from Man m WHERE m.playerId = :playerId"),
	
	@NamedQuery(name="ManById" , query="select m from Man m WHERE m.id=:id")
	
})
public class Man {
	
	@Id
	@GeneratedValue
	private Long id ;
	
	private String icon ;
	
	private String name ;
	
	private String team ;	
	
	private int num ;
	
	private String position ;
	
	private String height ;
	
	private String weight ;

	@Column(unique=true)
	private int playerId ;
	
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTeam() {
		return team;
	}

	public void setTeam(String team) {
		this.team = team;
	}
	
	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public String getWeight() {
		return weight;
	}

	public void setWeight(String weight) {
		this.weight = weight;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public int getPlayerId() {
		return playerId;
	}

	public void setPlayerId(int playerId) {
		this.playerId = playerId;
	}
	
}
